package com.edu.dreams.mapper;

import com.edu.dreams.entity.Anim;
import com.edu.dreams.entity.LiShi;
import com.edu.dreams.entity.ShouCang;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface AnimMapper {
	// @Param注解单一属性
	int addAnim(@Param("anim") Anim anim);

	Anim getAnimById(@Param("id") int id);

	List<Anim> getAllAnim();

	int deleteAnim(@Param("id") int id);

	int updateAnim(@Param("anim") Anim anim);

	List<Anim> searchAnim(@Param("animname") String animname);

	int addViewConutById(@Param("id") int id);

	List<Anim> sortAnim();

	List<ShouCang> getUserShouCang(@Param("uid") int uid);

	int addShouCang(@Param("uid") int uid, @Param("aname") String aname);

	int deleteShouCang(@Param("id") int id);

	List<LiShi> getUserLiShi(@Param("uid") int uid);

	int addLiShi(@Param("uid") int uid, @Param("aname") String aname);

	int deleteLiShi(@Param("id") int id);
}
